package com.ibm.workplace.wcm.cqplugin;

import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.*;

public class GetBugDetailsJob extends Job {

    private String id;
    private IBugSearchEngine bse;
    private String details;

    public GetBugDetailsJob(String name, String id, IBugSearchEngine bse) {
        super(name);

        this.id = id;
        this.bse = bse;
    }

    protected IStatus run(IProgressMonitor monitor) {
        details = bse.getBugDetails(id);
        
        return Status.OK_STATUS;
        //if (details != null) {            
        //}// else {
          //  return Status.
        //}
    }

    public String getBugDetails() {
        return details;
    }

}
